{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "174dfaf8",
   "metadata": {},
   "source": [
    "1.基于data数据，简历线性回归模型，计算其在测试数据上的r2分数（越接近1说明拟合的越好），可视化预测结果  \n",
    "2.加入多项式特征，建模  \n",
    "3.计算多项式回归对测试数据预测的r2分数，判断哪个更准确  \n",
    "4.可视化多项式回归模型数据预测结果，比较优劣"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "73e1ad88",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>T</th>\n",
       "      <th>rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>46.53</td>\n",
       "      <td>2.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>48.14</td>\n",
       "      <td>2.56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>50.15</td>\n",
       "      <td>2.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>51.36</td>\n",
       "      <td>2.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>52.57</td>\n",
       "      <td>2.74</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       T  rate\n",
       "0  46.53  2.49\n",
       "1  48.14  2.56\n",
       "2  50.15  2.63\n",
       "3  51.36  2.69\n",
       "4  52.57  2.74"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "data_train = pd.read_csv('T-R-train.csv')\n",
    "data_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "6f0a927a",
   "metadata": {},
   "outputs": [],
   "source": [
    "#赋值\n",
    "x_train = data_train.loc[:,'T']\n",
    "y_train = data_train.loc[:,'rate']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "6eea270c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAT0AAAEvCAYAAAA3hRYNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAARY0lEQVR4nO3df4xlZ13H8ffHdkm2tLDFrmjXLgsGaotoF0d+ZCMSSKyiYCGQgLFio1lrKukmTQNtoiExhmq1EdNIU1stmEqidFkUo0sjFagxNbM/YGmH+gPKj+3abm1KS90Eunz9Y+7C7DB35s7cO3PPvc/7lUz2zjnP3Pvtyc2n5znPOc+TqkKSWvF94y5AkjaSoSepKYaepKYYepKaYuhJaoqhJ6kpZ47rg88777zasWPHuD5e0pQ6cODAY1W1td/+sYXejh07mJ2dHdfHS5pSSb683H67t5KaYuhJaoqhJ6kphp6kphh6kppi6ElqiqEnqSlju09PGpV9h45y4/4HefiJE5y/ZTPXXnohl+3cNu6y1FGGnibavkNHuW7vEU586yQAR584wXV7jwAYfFqS3VtNtBv3P/idwDvlxLdOcuP+B8dUkbrO0NNEe/iJE6vaLhl6mmjnb9m8qu2SoaeJdu2lF7J50xmnbdu86QyuvfTCVb/XvkNH2XXDJ3nhe/6BXTd8kn2Hjo6qTHWIAxmaaKcGK4YdvX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ASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#可视化数据\n",
    "from matplotlib import pyplot as plt\n",
    "fig1 = plt.figure(figsize=(5,5))\n",
    "plt.scatter(x_train,y_train)\n",
    "plt.xlabel('temperature')\n",
    "plt.ylabel('rate')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "981a3e85",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression()"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#建立LR模型\n",
    "from sklearn.linear_model import LinearRegression\n",
    "lr1 = LinearRegression()\n",
    "x_train = np.array(x_train).reshape(-1,1)\n",
    "lr1.fit(x_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "d8b8d996",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>T</th>\n",
       "      <th>rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>45.376344</td>\n",
       "      <td>2.334559</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>52.186380</td>\n",
       "      <td>2.775735</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>61.863799</td>\n",
       "      <td>2.930147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>73.154122</td>\n",
       "      <td>2.488971</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>78.888889</td>\n",
       "      <td>1.981618</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           T      rate\n",
       "0  45.376344  2.334559\n",
       "1  52.186380  2.775735\n",
       "2  61.863799  2.930147\n",
       "3  73.154122  2.488971\n",
       "4  78.888889  1.981618"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#载入测试数据，计算r2分数\n",
    "data_test = pd.read_csv('T-R-test.csv')\n",
    "data_test.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "ec8d4d6a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.016665703886981964 -0.758336343735132\n"
     ]
    }
   ],
   "source": [
    "x_test = data_test.loc[:,'T']\n",
    "x_test = np.array(x_test).reshape(-1,1)\n",
    "y_test = data_test.loc[:,'rate']\n",
    "y_train_predict = lr1.predict(x_train)\n",
    "y_test_predict = lr1.predict(x_test)\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train = r2_score(y_train,y_train_predict)\n",
    "r2_test = r2_score(y_test,y_test_predict)\n",
    "print(r2_train,r2_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "de286903",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATwAAAE/CAYAAADbkX+oAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAduElEQVR4nO3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4Ivv8+2QCsBL70u8dwNaI2J99Xml9+W1gV0QcjIgzwAbgX1F5/QAgIh6IiGsi4reAQ8BzFLEvZRl4EXFXRCyJiKVkhhuPRsTHgB8BH8/u9nHgH0rUxIJJapDU1P+YzPmVp6jAvkTEy0CPpP4Cq28HnqYC+5LjwwwOZ6Hy+rIbeKukWZJE5nfSTeX1AwBJC7N/poFbyPxuitaXsr/wWNL1wH+NiHdLmgf8byBN5hf9gYg4VMr2jUbSRWSO6iAzJPxORHyhEvsCIGk18FVgOvA88Eky/3FWYl9mkTnhf1FEHMluq7jfi6T/BnyQzPCvE/gU0EiF9QNA0j8D84AzwH+JiJ8X83dS9oFnZlYsZTmkNTObDA48M0sMB56ZJYYDz8wSw4FnZonhwDOzxHDgmVliOPDMLDH+P2e7xClOevoiAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x_range = np.linspace(40,90,300).reshape(-1,1)\n",
    "y_range_predict = lr1.predict(x_range)\n",
    "fig2 = plt.figure(figsize=(5,5))\n",
    "plt.plot(x_range,y_range_predict)#这里是随机生成数据，然后测试公式的准确性，展示套用公式的结果\n",
    "plt.title('undrefitting')\n",
    "plt.scatter(x_train,y_train)#这里显示的是原始的数据分布\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "42ad0eb5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1.0000000e+00 4.6530000e+01 2.1650409e+03]\n",
      " [1.0000000e+00 4.8140000e+01 2.3174596e+03]\n",
      " [1.0000000e+00 5.0150000e+01 2.5150225e+03]\n",
      " [1.0000000e+00 5.1360000e+01 2.6378496e+03]\n",
      " [1.0000000e+00 5.2570000e+01 2.7636049e+03]\n",
      " [1.0000000e+00 5.4180000e+01 2.9354724e+03]\n",
      " [1.0000000e+00 5.6190000e+01 3.1573161e+03]\n",
      " [1.0000000e+00 5.8580000e+01 3.4316164e+03]\n",
      " [1.0000000e+00 6.1370000e+01 3.7662769e+03]\n",
      " [1.0000000e+00 6.3340000e+01 4.0119556e+03]\n",
      " [1.0000000e+00 6.5310000e+01 4.2653961e+03]\n",
      " [1.0000000e+00 6.6470000e+01 4.4182609e+03]\n",
      " [1.0000000e+00 6.8030000e+01 4.6280809e+03]\n",
      " [1.0000000e+00 6.9970000e+01 4.8958009e+03]\n",
      " [1.0000000e+00 7.1130000e+01 5.0594769e+03]\n",
      " [1.0000000e+00 7.1890000e+01 5.1681721e+03]\n",
      " [1.0000000e+00 7.3050000e+01 5.3363025e+03]\n",
      " [1.0000000e+00 7.4210000e+01 5.5071241e+03]]\n"
     ]
    }
   ],
   "source": [
    "# 多项式模型\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "poly2 = PolynomialFeatures(degree = 2)\n",
    "x_2_train = poly2.fit_transform(x_train)\n",
    "x_2_test = poly2.transform(x_test)\n",
    "print(x_2_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "97aa1faa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.970051540068943 0.996395455646867\n"
     ]
    }
   ],
   "source": [
    "lr2 = LinearRegression()\n",
    "lr2.fit(x_2_train,y_train)\n",
    "\n",
    "\n",
    "y_2_train_predict = lr2.predict(x_2_train)\n",
    "y_2_test_predict = lr2.predict(x_2_test)\n",
    "r2_2_train = r2_score(y_train,y_2_train_predict)\n",
    "r2_2_test = r2_score(y_test,y_2_test_predict)\n",
    "print(r2_2_train,r2_2_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "cc3f9b58",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATwAAAEvCAYAAADYR30zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AA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YfgtMc86dDgwi9PeJuWNxzq06tHA8cAZwAHiDGDsWM8sFxgJ5zrn+hJZhuIkYOw4AM+sP3EVoLexBwBVm1pNIHotzLiofhFZHmwlcCLwV3rYKyAl/nwOs8rrOBh7LBiDrqG0xdyxAS2A94b7fWD6Wo+q/FPgkFo+Ff68b3YrQGjVvhY8npo4jXOcNwPM1nv8E+M9IHks0t/B+Q+hgq2tsa+uc2woQ/trGi8JOggPeNbMFZnZ3eFssHks3oBj4c7ir4XkzSyM2j6Wmm4C/hb+PqWNxzhUBvwI2AVuBUufcu8TYcYQVAOeZWWszaw6MJrREbMSOJSoDz8yuAHY45xZ4XUuEjHDODQVGAd81s/O8LugkJQFDgWedc0OA/cTAqdLxhJcevRJ43etaTka4P+sqoCvQHkgzs1u9rerkOOdWAL8EZgDTgCVA5FbhJkoDDxgBXGlmG4C/Axea2avAdjPLAQh/3eFdiQ3nnNsS/rqDUD/RMGLzWAqBQufc3PDzfxIKwFg8lkNGAQudc9vDz2PtWC4G1jvnip1zQWAicDaxdxwAOOdecM4Ndc6dB+wG1hDBY4nKwHPO/dg518E514XQ6cb7zrlbCS0Afnt4t9uBNz0qscHMLM3M0g99T6h/pYAYPBbn3DZgs5n1Dm+6CFhODB5LDTfz79NZiL1j2QScZWbNzcwI/U1WEHvHAYCZtQl/7QRcS+hvE7FjifqBx2Z2PvAfzrkrzKw1MAHoROgPfYNzbreX9dXHzLoRatVB6JTwNefcz2PxWADMbDDwPJAMrAPuIPQ/zlg8luaEOvy7OedKw9ti7u9iZj8Fvkbo9G8RcCfQghg7DgAzmwW0BoLAg865mZH8m0R94ImIREpUntKKiDQGBZ6IJAwFnogkDAWeiCQMBZ6IJAwFnogkDAWeiCQMBZ6IJIz/DwprDrsi0iMCAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x_2_range = np.linspace(40,90,300).reshape(-1,1)\n",
    "x_2_range = poly2.transform(x_2_range)\n",
    "y_2_range_predict = lr2.predict(x_2_range)\n",
    "\n",
    "fig3 = plt.figure(figsize=(5,5))\n",
    "plt.plot(x_range,y_2_range_predict)\n",
    "plt.scatter(x_train,y_train)\n",
    "plt.scatter(x_test,y_test)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "9c0ef863",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1.00000000e+00 4.65300000e+01 2.16504090e+03 1.00739353e+05\n",
      "  4.68740210e+06 2.18104820e+08]\n",
      " [1.00000000e+00 4.81400000e+01 2.31745960e+03 1.11562505e+05\n",
      "  5.37061900e+06 2.58541599e+08]\n",
      " [1.00000000e+00 5.01500000e+01 2.51502250e+03 1.26128378e+05\n",
      "  6.32533818e+06 3.17215710e+08]\n",
      " [1.00000000e+00 5.13600000e+01 2.63784960e+03 1.35479955e+05\n",
      "  6.95825051e+06 3.57375746e+08]\n",
      " [1.00000000e+00 5.25700000e+01 2.76360490e+03 1.45282710e+05\n",
      "  7.63751204e+06 4.01504008e+08]\n",
      " [1.00000000e+00 5.41800000e+01 2.93547240e+03 1.59043895e+05\n",
      "  8.61699821e+06 4.66868963e+08]\n",
      " [1.00000000e+00 5.61900000e+01 3.15731610e+03 1.77409592e+05\n",
      "  9.96864496e+06 5.60138160e+08]\n",
      " [1.00000000e+00 5.85800000e+01 3.43161640e+03 2.01024089e+05\n",
      "  1.17759911e+07 6.89837560e+08]\n",
      " [1.00000000e+00 6.13700000e+01 3.76627690e+03 2.31136413e+05\n",
      "  1.41848417e+07 8.70523734e+08]\n",
      " [1.00000000e+00 6.33400000e+01 4.01195560e+03 2.54117268e+05\n",
      "  1.60957877e+07 1.01950720e+09]\n",
      " [1.00000000e+00 6.53100000e+01 4.26539610e+03 2.78573019e+05\n",
      "  1.81936039e+07 1.18822427e+09]\n",
      " [1.00000000e+00 6.64700000e+01 4.41826090e+03 2.93681802e+05\n",
      "  1.95210294e+07 1.29756282e+09]\n",
      " [1.00000000e+00 6.80300000e+01 4.62808090e+03 3.14848344e+05\n",
      "  2.14191328e+07 1.45714361e+09]\n",
      " [1.00000000e+00 6.99700000e+01 4.89580090e+03 3.42559189e+05\n",
      "  2.39688665e+07 1.67710159e+09]\n",
      " [1.00000000e+00 7.11300000e+01 5.05947690e+03 3.59880592e+05\n",
      "  2.55983065e+07 1.82080754e+09]\n",
      " [1.00000000e+00 7.18900000e+01 5.16817210e+03 3.71539892e+05\n",
      "  2.67100029e+07 1.92018211e+09]\n",
      " [1.00000000e+00 7.30500000e+01 5.33630250e+03 3.89816898e+05\n",
      "  2.84761244e+07 2.08018089e+09]\n",
      " [1.00000000e+00 7.42100000e+01 5.50712410e+03 4.08683679e+05\n",
      "  3.03284159e+07 2.25067174e+09]]\n"
     ]
    }
   ],
   "source": [
    "# 尝试5次项\n",
    "poly5 = PolynomialFeatures(degree = 5)\n",
    "x_5_train = poly5.fit_transform(x_train)\n",
    "x_5_test = poly5.transform(x_test)\n",
    "print(x_5_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "fac2f93c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9978527267142803 0.543784598216784\n"
     ]
    }
   ],
   "source": [
    "lr5 = LinearRegression()\n",
    "lr5.fit(x_5_train,y_train)\n",
    "\n",
    "\n",
    "y_5_train_predict = lr5.predict(x_5_train)\n",
    "y_5_test_predict = lr5.predict(x_5_test)\n",
    "r2_5_train = r2_score(y_train,y_5_train_predict)\n",
    "r2_5_test = r2_score(y_test,y_5_test_predict)\n",
    "print(r2_5_train,r2_5_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "63e5f894",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAATwAAAE/CAYAAADbkX+oAAAABHNCSVQICAgIfA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CYII=\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x_5_range = np.linspace(40,90,300).reshape(-1,1)\n",
    "x_5_range = poly5.transform(x_5_range)\n",
    "y_5_range_predict = lr5.predict(x_5_range)\n",
    "\n",
    "fig5 = plt.figure(figsize=(5,5))\n",
    "plt.plot(x_range,y_5_range_predict)\n",
    "plt.title('overfitting')\n",
    "plt.scatter(x_train,y_train)\n",
    "plt.scatter(x_test,y_test)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8e21f40f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
